# -*- codeing = utf-8 -*-
# @Time : 2021/2/27 18:22
# @Atuthor: 朱朱
# @File: 139 练习2.py
# @Software: PyCharm

import math

class Pointer(object):
    def __init__(self,x,y):
        self.x = x
        self.y = y

class Circle(object):
    def __init__(self, x, y, radius):
        self.x = x
        self.y = y
        self.radius = radius

    def get_area(self):
        return self.radius**2 * math.pi

    def get_length(self):
        return self.radius*2 * math.pi

    def relationship(self,point):
        distance = (point.x-self.x) ** 2 + (point.y - self.y)**2
        if distance > self.radius**2:
            print('在圆外')
        elif distance < self.radius**2:
            print('在圆内')
        else:
            print('在圆上')

p = Pointer(3,4)
c = Circle(3,4,5)

p1 = Pointer(2,2)
c.relationship(p1)

p2 = Pointer(-3,-4)
c.relationship(p2)

p3 = Pointer(6,8)
c.relationship(p3)

print(hex(id(p)))
print(hex(id(c)))
print(hex(id(p1)))